<clr-modal [(clrModalOpen)]="createAppUserOpened" [clrModalSize]="'lg'">
  <h3 class="modal-title">{{appUserTitle}}1</h3>
  <div class="modal-body">
    <form #appUserForm="ngForm" clrForm clrLayout="horizontal">
      <clr-input-container>
        <label class="required">{{'TITLE.NAME' | translate}}</label>
        <input clrInput type="text" id="app_user_name" [(ngModel)]="appUser.user.name" name="name" size="32" required
          [readonly]="actionType==1" maxlength="32" (keyup)='handleValidation()'>
        <clr-control-helper>
          <span class="clr-subtext" *ngIf="!isNameValid">{{'USER.NO_USER' | translate}}</span>
        </clr-control-helper>
        <clr-control-error>required</clr-control-error>
      </clr-input-container>
      <div class="clr-form-control clr-row">
        <label class="clr-control-label required">{{'USER.GROUP' | translate}}</label>
        <div class="clr-control-container clr-col-md-10 clr-col-12">
          <ng2-dual-list-box name="app_user_group" [data]="allGroups" valueField="id" textField="name" [availableText]="'TITLE.AVAIL_ITEM' | translate"
            [selectedText]="'TITLE.CHOOSED_ITEM' | translate" [(ngModel)]="selectGroups">
          </ng2-dual-list-box>
        </div>
      </div>
    </form>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-outline" (click)="onCancel()">{{'BUTTON.CANCEL' | translate}}</button>
    <button type="button" class="btn btn-primary" [disabled]="!isValid"
            (click)="onSubmit()">{{'BUTTON.SUBMIT' | translate}}</button>
  </div>
</clr-modal>
